import request from './../utils/request'

// 添加轮播图
export function bannerAdd (params) {
  return request({
    url: '/banner/add',
    data: params,
    method: 'POST'
  })
}

// 删除单条轮播图数据
export function bannerDelete (params) {
  return request({
    url: '/banner/delete',
    data: params,
    method: 'GET'
  })
}

// 删除所有轮播图数据
export function bannerRemoveAll () {
  return request({
    url: '/banner/removeAll',
    method: 'GET'
    // headers: {
    //   'content-type': 'application/x-www-form-url-encoded' 表单提交
    //   'content-type': 'multipart/form-data' 文件提交
    //   'content-type': 'application/json' 默认
    // }
  })
}

// 获取轮播图的数据
export function getBannerList () {
  return request({
    url: '/banner/list',
    method: 'GET'
  })
}